﻿using Entity;
using Entity.SysEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommandService
{
   public interface ICommands
    {
        /// <summary>
      ///根据对象模型获取数据列表
      /// </summary>
      /// <param name="obj">查询数据模型</param>
      /// <returns></returns>
       List<T> GetDataByObject<T>(object obj);
       /// <summary>
       ///根据查询对象模型获取数据列表
       /// </summary>
       /// <param name="obj">查询数据模型</param>
       List<T> QueryData<T>(QueryModel model);
       /// <summary>
       /// 数据添加方法
       /// </summary>
       /// <param name="obj">数据模型</param>
       /// <returns></returns>
       ReturnResult Add(object obj);
       /// <summary>
       /// 修改方法(单表)
       /// </summary>
       /// <param name="oper"></param>
       /// <returns></returns>
       ReturnResult Edit(OperateModel oper);
       /// <summary>
       /// 删除方法
       /// </summary>
       /// <param name="obj"></param>
       /// <returns></returns>
       ReturnResult Del(object obj);
       /// <summary>
       /// 多表事物更新方法
       /// </summary>
       /// <param name="list">操作集合集</param>
       /// <returns></returns>
       ReturnResult MoreUpdate(List<OperateModel> list);
       /// <summary>
       /// 获取表的结构数据
       /// </summary>
       /// <param name="tableName">表名</param>
       /// <returns></returns>
       List<TableCloumns> TableStructure(string tableName);
       ReturnResult UpdateSql(string sql);

    }
}
